//
// Created by wangxiaodong on 2017/11/25.
//

#ifndef SELECTIONSORT_STUDENT_H
#define SELECTIONSORT_STUDENT_H

#include <string>
#include <iostream>

using namespace std;

struct Student{
    string name;
    int score;

    bool operator<(const Student &other){
        return score == other.score ? name < other.name : score < other.score;
    }

    bool operator>(const Student &other){
        return score == other.score ? name > other.name : score > other.score;
    }

    friend ostream& operator<<(ostream &os, const Student &student){
        os<<"Student:"<<student.name<<"\t"<<student.score<<endl;
        return os;
    }

};

#endif //SELECTIONSORT_STUDENT_H
